import request from '@/utils/request'

// 查询(资讯/平台/公告)信息列表
export function listCms(query) {
  return request({
    url: '/prod-api/platform/cms/list',
    method: 'get',
    params: query
  })
}

// 查询(资讯/平台/公告)信息详细
export function getCms(cmsUid) {
  return request({
    url: '/prod-api/platform/cms/' + cmsUid,
    method: 'get'
  })
}

export function getCmsUid(cmsUid) {
  return request({
    url: '/prod-api/platform/cms/get/' + cmsUid,
    method: 'get'
  })
}




// 新增(资讯/平台/公告)信息
export function addCms(data) {
  return request({
    url: '/prod-api/platform/cms',
    method: 'post',
    data: data
  })
}

// 修改(资讯/平台/公告)信息
export function updateCms(data) {
  return request({
    url: '/prod-api/platform/cms',
    method: 'put',
    data: data
  })
}


// 修改(资讯/平台/公告)信息
export function updateCmsStatus(uid, dataStatus) {
let data = {
  cmsUid:uid,
  dataStatus:dataStatus
}

  return request({
    url: '/prod-api/platform/cms',
    method: 'put',
    data: data
  })
}

// 删除(资讯/平台/公告)信息
export function delCmsN(cmsUid) {
  return request({
    url: '/prod-api/platform/cms/delN/' + cmsUid,
    method: 'delete'
  })
}
export function delCmsI(cmsUid) {
  return request({
    url: '/prod-api/platform/cms/delI/' + cmsUid,
    method: 'delete'
  })
}
export function delCmsP(cmsUid) {
  return request({
    url: '/prod-api/platform/cms/delP/' + cmsUid,
    method: 'delete'
  })
}
